(library (templates page-wrapper)
  (export page-wrapper-template)
  (import
    (except (rnrs base) let-values error)
    (only (guile) lambda* λ)
    (templates nav)))


(define page-wrapper-template
  (λ (request body page-content)
    "page-wrapper-template adds things like navigation and footer. It renders
the actual content into the correct place on the website."
    `((div (@ (class "body-wrapper"))
           ,(nav-template request body)
           ;; Page content should be wrapped inside a <main> tag or similar. It
           ;; is expected to return a single root element, which may contain
           ;; other elements.
           ,page-content
           ;; TODO: footer
           ))))
